package com.amazon.controller;

import com.amazon.model.CommonResult;
import com.amazon.model.MenuModel;
import com.amazon.service.MenuService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/amazon")
public class MenuController {
    @Resource
    private MenuService menuService;
    @GetMapping("/getMenu")
    public CommonResult getMenu(){
        MenuModel menuModel = menuService.makeMenu();
        return CommonResult.ok(menuModel);
    }
}
